package com.module.recall.manager;

import org.hibernate.Session;

import base.dao.GenericHibernateDao;
import base.manager.GenericHibernateManager;
import base.util.Page;

import com.module.recall.dao.AntiFakeRecallRegDao;
import com.module.recall.util.AntiFakeBeanUtil;
import com.module.recall.vo.AntiFakeRecallReg;

/**
 * 召回登记
 * 
 * @author wult
 * @Date Mar 5, 2012
 */
public class AntiFakeRecallRegManager extends
		GenericHibernateManager<AntiFakeRecallReg, Long> {
	private AntiFakeRecallRegDao dao = AntiFakeRecallRegDao.getInstance();
	private static AntiFakeRecallRegManager service;

	@Override
	public GenericHibernateDao<AntiFakeRecallReg, Long> getDao() {
		return dao;
	}

	public synchronized static AntiFakeRecallRegManager getInstance() {
		if (service == null) {
			service = new AntiFakeRecallRegManager();
		}
		return service;
	}

	public Page listRecallRegPage(AntiFakeRecallReg bean, Page obg)
			throws Exception {
		Session session = this.getSession();
		Page page = null;
		try {
			page = dao.getList(session, bean, obg.getStart(), obg.getLimit());
		} catch (Exception e) {
			throw e;
		} finally {
			this.closeSession();
		}
		return page;
	}

}
